package com.byedu.domain.focus;

import com.byedu.domain.focus.vo.FocusWorkorderVO;
import com.byedu.util.CommonUtil;

import java.io.Serializable;

/**
 * Created by Luo on 2017-08-23.
 */
public class FocusWorkorderDO implements Serializable {

    /*工单编号*/
    private String id;
    /*用户名*/
    private String name;
    /*项目id*/
    private int projectid;
    /*描述文件*/
    private String decfile;
    /*开始时间*/
    private String starttime;
    /*截止时间*/
    private String excuttime;
    /*完成时间*/
    private String finishtime;
    /*执行部门*/
    private int depart;
    /*执行人*/
    private String userid;

    public String getFauserid() {
        return fauserid;
    }

    public void setFauserid(String fauserid) {
        this.fauserid = fauserid;
    }

    private String fauserid;
    /*证明文件*/
    private String certifile;
    /*工单状态*/
    private String status ;

    private String statustr;

    public String getStatustr() {
        return statustr;
    }

    public void setStatustr(String statustr) {
        this.statustr = statustr;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getProjectid() {
        return projectid;
    }

    public void setProjectid(int projectid) {
        this.projectid = projectid;
    }

    public String getDecfile() {
        return decfile;
    }

    public void setDecfile(String decfile) {
        this.decfile = decfile;
    }

    public String getStarttime() {
        return starttime;
    }

    public void setStarttime(String starttime) {
        this.starttime = starttime;
    }

    public String getExcuttime() {
        return excuttime;
    }

    public void setExcuttime(String excuttime) {
        this.excuttime = excuttime;
    }

    public String getFinishtime() {
        return finishtime;
    }

    public void setFinishtime(String finishtime) {
        this.finishtime = finishtime;
    }

    public int getDepart() {
        return depart;
    }

    public void setDepart(int depart) {
        this.depart = depart;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public String getCertifile() {
        return certifile;
    }

    public void setCertifile(String certifile) {
        this.certifile = certifile;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public FocusWorkorderDO() {}

    public FocusWorkorderDO(FocusWorkorderVO focusWorkVO) {
        if(focusWorkVO != null) {
            this.id = focusWorkVO.getId();
            this.name = focusWorkVO.getName();
            this.projectid = focusWorkVO.getProject().getId();
            this.decfile = focusWorkVO.getDecfile();
            this.starttime = focusWorkVO.getStarttime();
            this.excuttime = focusWorkVO.getExcuttime();
            this.finishtime = focusWorkVO.getFinishtime();
            this.depart = focusWorkVO.getDepart().getCode();
            this.userid = focusWorkVO.getUser().getId();
            this.fauserid = focusWorkVO.getFauser().getId();
            this.certifile = focusWorkVO.getCertifile();
            this.status = String.valueOf(focusWorkVO.getStatus().getCode());
            this.statustr = focusWorkVO.getStatustr();
        }
    }

    @Override
    public String toString() {
        return "FocusWorkDO{" +
         "id='" + id + '\'' +
         ", name='" + name + '\'' +
         ", projectid=" + projectid +
         ", decfile='" + decfile + '\'' +
         ", starttime='" + starttime + '\'' +
         ", excuttime='" + excuttime + '\'' +
         ", finishtime='" + finishtime + '\'' +
         ", depart=" + depart +
         ", userid='" + userid + '\'' +
         ", certifile='" + certifile + '\'' +
         ", status='" + status + '\'' +
         ", statustr=" + statustr +
         '}';
    }
}
